package com.blog.personalblog.VO;

import com.blog.personalblog.Validator.MobileNo;
import com.blog.personalblog.util.PhoneUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserVo {
    /**
     * 主键id
     */
    private Integer id;

    /**
     * 用户名
     */
    @NotNull
    @NotBlank
    private String userName;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 上次登录时间
     */
    private Date lastLoginTime;

    /**
     * 手机号
     */
    @NotNull
    @MobileNo
    private String phone;

    /**
     * 昵称
     */
    private String nickname;
}
